export default function(allNum, allPrice, cartData){
  // 计算总数量
  allNum.innerText = cartData.reduce((prev,val)=>prev+(val.check ? val.num : 0), 0);
  // 计算总价
  allPrice.innerText = cartData.reduce((prev,val)=>prev+(val.check ? val.num*val.price : 0), 0);
}
